home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2005 August / DPPCPRO0805.ISO / Assets / Interface / Main.dxr / Flash Components_1_Centre pane.swf / scripts / __Packages / SoftwarePage.as < prev    next >
Encoding:
Text File  |  2005-05-20  |  21.5 KB  |  546 lines

  1. class SoftwarePage extends mx.core.UIObject
  2. {
  3.    var __title;
  4.    var __column1Title;
  5.    var __column2Title;
  6.    var __description;
  7.    var __column1;
  8.    var __column2;
  9.    var __btnList;
  10.    var __titleRows;
  11.    var __column1Groups;
  12.    var __column2Groups;
  13.    var __btnListener;
  14.    var __columnBackground;
  15.    var dispatchEvent;
  16.    static var symbolName = "SoftwarePage";
  17.    static var symbolOwner = SoftwarePage;
  18.    var className = "SoftwarePage";
  19.    static var version = "0.0.0.1";
  20.    static var __maxPageHeight = 380;
  21.    static var __pageBorder = 5;
  22.    static var __vSpacing = 5;
  23.    static var __hSpacing = 5;
  24.    static var __headerBoxHeight = 23;
  25.    var __nextDepth = 3;
  26.    function SoftwarePage()
  27.    {
  28.       super();
  29.       mx.events.EventDispatcher.initialize(this);
  30.    }
  31.    function set enabled(activeStatus)
  32.    {
  33.       if(activeStatus == true)
  34.       {
  35.          var _loc5_ = new TextFormat();
  36.          _loc5_.color = 0;
  37.          var _loc6_ = "<headline>" + this.__title.htmlText.slice(18,this.__title.htmlText.length - 19) + "</headline>";
  38.          this.__title.setTextFormat(_loc5_);
  39.          this.__title.setNewTextFormat(_loc5_);
  40.          this.__title.htmlText = _loc6_;
  41.          var _loc4_ = this.__column1Title.text.slice("<columnboldwhitedisabled>".length,this.__column1Title.text.length - "</columnboldwhitedisabled>".length);
  42.          this.column1Title = "<columnboldwhite>" + _loc4_ + "</columnboldwhite>";
  43.          _loc4_ = this.__column2Title.text.slice("<columnboldwhitedisabled>".length,this.__column2Title.text.length - "</columnboldwhitedisabled>".length);
  44.          this.column2Title = "<columnboldwhite>" + _loc4_ + "</columnboldwhite>";
  45.       }
  46.       else
  47.       {
  48.          _loc5_ = new TextFormat();
  49.          _loc5_.color = 9414579;
  50.          _loc6_ = "<headlinedisabled>" + this.__title.htmlText.slice(10,this.__title.htmlText.length - 11) + "</headlinedisabled>";
  51.          this.__title.setTextFormat(_loc5_);
  52.          this.__title.setNewTextFormat(_loc5_);
  53.          this.__title.htmlText = _loc6_;
  54.          _loc4_ = this.__column1Title.text.slice("<columnboldwhite>".length,this.__column1Title.text.length - "</columnboldwhite>".length);
  55.          this.column1Title = "<columnboldwhitedisabled>" + _loc4_ + "</columnboldwhitedisabled>";
  56.          _loc4_ = this.__column2Title.text.slice("<columnboldwhite>".length,this.__column2Title.text.length - "</columnboldwhite>".length);
  57.          this.column2Title = "<columnboldwhitedisabled>" + _loc4_ + "</columnboldwhitedisabled>";
  58.       }
  59.       this.__description.enabled = this.__column1.enabled = this.__column2.enabled = activeStatus;
  60.       this.__description.label.selectable = this.__column1.label.selectable = this.__column2.label.selectable = false;
  61.       var _loc2_ = 0;
  62.       while(_loc2_ < this.__btnList.length)
  63.       {
  64.          this.__btnList[_loc2_].enabled = activeStatus;
  65.          _loc2_ = _loc2_ + 1;
  66.       }
  67.       if(activeStatus == true)
  68.       {
  69.          this.drawBackground("0x808080","0xEDE7D5");
  70.       }
  71.       else
  72.       {
  73.          this.drawBackground("0xCCCCCC","0xDDDDDD");
  74.       }
  75.    }
  76.    function init(Void)
  77.    {
  78.       super.init();
  79.       this.__titleRows = 0;
  80.       this.__column1Groups = this.__column2Groups = 0;
  81.       this.__btnList = new Array();
  82.       this.__btnListener = new Object();
  83.       this.__btnListener.click = function(evtObj)
  84.       {
  85.          if(typeof evtObj.target.target == "string")
  86.          {
  87.             _level0.getURL(evtObj.target.target);
  88.          }
  89.          else
  90.          {
  91.             _level0.gotoStepDialog(_level0.sections.selectedIndex,_level0.entries.selectedIndex,evtObj.target.target);
  92.          }
  93.       };
  94.    }
  95.    function size(Void)
  96.    {
  97.       super.size();
  98.    }
  99.    function doneSetting()
  100.    {
  101.       this.sendMessage("pageReady");
  102.    }
  103.    function set title(newTitle)
  104.    {
  105.       function workingLayout(bodyText, width, targetObject)
  106.       {
  107.          trace("--- SoftwarePage workingLayout received " + bodyText);
  108.          trace("targetObject: " + targetObject);
  109.          var titleFormat = _level0.styleSheetToTextFormat(_global.textStyles.getStyle("headline"));
  110.          targetObject.html = true;
  111.          with(targetObject)
  112.          {
  113.             embedFonts = true;
  114.             setTextFormat(titleFormat);
  115.             setNewTextFormat(titleFormat);
  116.             styleSheet = _global.textStyles;
  117.             border = false;
  118.             selectable = false;
  119.             autoSize = true;
  120.             borderColor = 13421772;
  121.             multiline = true;
  122.             wordWrap = true;
  123.          }
  124.          var oneRowMetrics = titleFormat.getTextExtent("a",width);
  125.          var twoRowMetrics = titleFormat.getTextExtent("a\na",width);
  126.          var tfhIncrement = twoRowMetrics.textFieldHeight - oneRowMetrics.textFieldHeight;
  127.          var metrics = titleFormat.getTextExtent(bodyText,width);
  128.          var finalHtmlText = "<headline><textformat leading=\'" + myLeading + "\'>" + bodyText + "</textformat></headline>";
  129.          targetObject.htmlText = finalHtmlText;
  130.          var positiveLeading = myLeading >= 0 ? myLeading : - myLeading;
  131.          var calculatedHeight = targetObject._height;
  132.          targetObject.autoSize = false;
  133.          targetObject._height = metrics.textFieldHeight + 1;
  134.          metrics = titleFormat.getTextExtent("Aq",width);
  135.          targetObject.htmlText = "<headline><textformat leading=\'0\'>Aq</textformat></headline>";
  136.          var unleadedTextHeight1 = targetObject.textHeight;
  137.          var unleadedFieldHeight = metrics.textFieldHeight + 1;
  138.          targetObject.htmlText = "<headline><textformat leading=\'-1\'>Aq</textformat></headline>";
  139.          var unleadedTextHeight2 = targetObject.textHeight;
  140.          var numRows = unleadedTextHeight2 - unleadedTextHeight1;
  141.          numRows = numRows >= 0 ? numRows : - numRows;
  142.          trace("numRows: " + numRows);
  143.          trace("unleadedFieldHeight: " + unleadedFieldHeight);
  144.          targetObject.htmlText = "<headline><textformat leading=\'0\'>" + bodyText + "</textformat></headline>";
  145.          var unleadedTextHeight1 = targetObject.textHeight;
  146.          var unleadedFieldHeight = targetObject._height;
  147.          targetObject.htmlText = "<headline><textformat leading=\'-1\'>" + bodyText + "</textformat></headline>";
  148.          var unleadedTextHeight2 = targetObject.textHeight;
  149.          numRows = unleadedTextHeight2 - unleadedTextHeight1;
  150.          numRows = numRows >= 0 ? numRows : - numRows;
  151.          targetObject.htmlText = finalHtmlText;
  152.          trace("--- SoftwarePage setting finalHtmlText: " + finalHtmlText);
  153.          trace("targetObject: " + targetObject);
  154.          trace("__titleRows: " + targetObject._parent.__titleRows);
  155.          targetObject._parent.__titleRows = numRows;
  156.          trace("FINAL VALUE (numRows): " + numRows);
  157.          switch(numRows)
  158.          {
  159.             case 1:
  160.                targetObject._height = unleadedFieldHeight + (numRows - 1) * myLeading;
  161.                break;
  162.             case 2:
  163.                targetObject._height = unleadedFieldHeight + (numRows - 1) * myLeading;
  164.                break;
  165.             case 3:
  166.                targetObject._height = unleadedFieldHeight + (numRows - 1) * myLeading;
  167.                break;
  168.             default:
  169.                targetObject._height = 103;
  170.          }
  171.       }
  172.       trace("--- SoftwarePage.title received: " + newTitle);
  173.       var correctedTitle = _level0.replaceAll(newTitle,"1","l");
  174.       this.createTextField("__title",this.__nextDepth,SoftwarePage.__pageBorder,SoftwarePage.__pageBorder,365,50);
  175.       this.__nextDepth = this.__nextDepth + 1;
  176.       var myLeading = -9;
  177.       var titleFormat = _level0.styleSheetToTextFormat(_global.textStyles.getStyle("headline"));
  178.       trace("correctedTitle: " + correctedTitle);
  179.       workingLayout(correctedTitle,365,this.__title);
  180.       trace("FINAL VALUE (__title._height): " + this.__title._height);
  181.    }
  182.    function set description(newDesc)
  183.    {
  184.       if(this.__description == undefined)
  185.       {
  186.          this.__description = this.createClassObject(mx.controls.TextArea,"description",this.__nextDepth);
  187.          this.__description.editable = false;
  188.          this.__description.label.selectable = false;
  189.          this.__description.wordWrap = true;
  190.          this.__description.borderStyle = "none";
  191.          this.__description.html = true;
  192.          this.__description.embedFonts = true;
  193.          this.__description.styleSheet = _global.textStyles;
  194.          this.__description.setStyle("styleName","scrollTextAreaStyle");
  195.          this.__nextDepth = this.__nextDepth + 1;
  196.       }
  197.       if(this.__description.text != newDesc)
  198.       {
  199.          this.__description.text = "<pagebody>" + newDesc + "</pagebody>";
  200.          this.__description._x = SoftwarePage.__pageBorder;
  201.          this.__description._y = this.__title._y + this.__title._height + 2 * SoftwarePage.__vSpacing - 12;
  202.          var _loc3_ = undefined;
  203.          trace("__titleRows: " + this.__titleRows);
  204.          switch(this.__titleRows)
  205.          {
  206.             case 1:
  207.                trace("ONE ROW TITLE");
  208.                _loc3_ = 155;
  209.                break;
  210.             case 2:
  211.                trace("TWO ROW TITLE");
  212.                _loc3_ = 133;
  213.                break;
  214.             case 3:
  215.                trace("THREE ROW TITLE");
  216.                _loc3_ = 112;
  217.                break;
  218.             default:
  219.                trace("OTHER HEIGHT - DEFAULT TO THREE ROWS");
  220.                _loc3_ = 112;
  221.          }
  222.          this.__description.setSize(365,_loc3_);
  223.       }
  224.       trace("FINAL VALUE (__description._height): " + this.__description._height);
  225.    }
  226.    function set buttons(btns)
  227.    {
  228.       var _loc6_ = btns.length;
  229.       var _loc2_ = 0;
  230.       while(_loc2_ < _loc6_)
  231.       {
  232.          var _loc5_ = "btn" + (_loc2_ + 1);
  233.          var _loc4_ = null;
  234.          _loc4_ = this.attachMovie("Button",_loc5_,this.__nextDepth);
  235.          this.__btnList.push(_loc4_);
  236.          this.__nextDepth = this.__nextDepth + 1;
  237.          this.__btnList[_loc2_].label = btns[_loc2_].label.toUpperCase();
  238.          if(btns[_loc2_].target != undefined)
  239.          {
  240.             this.__btnList[_loc2_].target = btns[_loc2_].target;
  241.          }
  242.          else
  243.          {
  244.             this.__btnList[_loc2_].target = btns[_loc2_].linkNum;
  245.          }
  246.          this.__btnList[_loc2_].embedFonts = true;
  247.          this.__btnList[_loc2_].setStyle("styleName","buttonStyle");
  248.          this.__btnList[_loc2_].addEventListener("click",this.__btnListener);
  249.          _loc2_ = _loc2_ + 1;
  250.       }
  251.       var _loc8_ = (365 - 2 * SoftwarePage.__pageBorder - (_loc6_ - 1) * SoftwarePage.__hSpacing) / _loc6_;
  252.       _loc8_ = _loc8_ <= 125 ? _loc8_ : 125;
  253.       var _loc14_ = _loc6_ * _loc8_;
  254.       var _loc11_ = 365 - _loc14_;
  255.       var _loc15_ = _loc11_ / 2;
  256.       var _loc7_ = _loc15_;
  257.       var _loc10_ = 263;
  258.       var _loc9_ = this.__description._y + this.__description._height;
  259.       var _loc12_ = _loc9_ + this.__btnList[0].__height + SoftwarePage.__vSpacing + SoftwarePage.__vSpacing;
  260.       var _loc13_ = undefined;
  261.       if(_loc12_ >= _loc10_)
  262.       {
  263.          _loc13_ = _loc9_ + Math.floor((_loc10_ - _loc9_ - this.__btnList[0].__height) / 2);
  264.       }
  265.       else
  266.       {
  267.          _loc13_ = _loc9_ + SoftwarePage.__vSpacing;
  268.       }
  269.       _loc2_ = 0;
  270.       while(_loc2_ < _loc6_)
  271.       {
  272.          this.__btnList[_loc2_].move(_loc7_,236 - 2 * SoftwarePage.__vSpacing);
  273.          _loc7_ += _loc8_ + SoftwarePage.__hSpacing;
  274.          _loc2_ = _loc2_ + 1;
  275.       }
  276.    }
  277.    function set column1Groups(numGroups)
  278.    {
  279.       this.__column1Groups = numGroups;
  280.    }
  281.    function set column2Groups(numGroups)
  282.    {
  283.       this.__column2Groups = numGroups;
  284.    }
  285.    function set column1Title(titleText)
  286.    {
  287.       if(this.__column1Title == undefined)
  288.       {
  289.          this.__column1Title = this.createClassObject(mx.controls.TextArea,"footerCol1Title",this.__nextDepth);
  290.          this.__nextDepth = this.__nextDepth + 1;
  291.          this.__column1Title.editable = false;
  292.          this.__column1Title.label.selectable = false;
  293.          this.__column1Title.wordWrap = false;
  294.          this.__column1Title.hScrollPolicy = this.__column1Title.vScrollPolicy = "off";
  295.          this.__column1Title.borderStyle = "none";
  296.          this.__column1Title.html = true;
  297.          this.__column1Title.embedFonts = true;
  298.          this.__column1Title.styleSheet = _global.textStyles;
  299.       }
  300.       if(this.__column1Title.text != titleText)
  301.       {
  302.          this.__column1Title.text = titleText;
  303.          this.__column1Title._x = 2 * SoftwarePage.__pageBorder;
  304.          this.__column1Title._y = 252;
  305.          this.__column1Title.setSize(180,25);
  306.       }
  307.    }
  308.    function set column2Title(titleText)
  309.    {
  310.       if(this.__column2Title == undefined)
  311.       {
  312.          this.__column2Title = this.createClassObject(mx.controls.TextArea,"footerCol1Title",this.__nextDepth);
  313.          this.__nextDepth = this.__nextDepth + 1;
  314.          this.__column2Title.editable = false;
  315.          this.__column2Title.label.selectable = false;
  316.          this.__column2Title.wordWrap = false;
  317.          this.__column2Title.hScrollPolicy = this.__column2Title.vScrollPolicy = "off";
  318.          this.__column2Title.borderStyle = "none";
  319.          this.__column2Title.html = true;
  320.          this.__column2Title.embedFonts = true;
  321.          this.__column2Title.styleSheet = _global.textStyles;
  322.       }
  323.       if(this.__column2Title.text != titleText)
  324.       {
  325.          this.__column2Title.text = titleText;
  326.          this.__column2Title._x = 2 * SoftwarePage.__pageBorder + 180 + SoftwarePage.__hSpacing;
  327.          this.__column2Title._y = 252;
  328.          this.__column2Title.setSize(180,25);
  329.       }
  330.    }
  331.    function set column1(colText)
  332.    {
  333.       if(this.__column1 == undefined)
  334.       {
  335.          this.__column1 = this.createClassObject(mx.controls.TextArea,"footerCol1",this.__nextDepth);
  336.          this.__nextDepth = this.__nextDepth + 1;
  337.          this.__column1.editable = false;
  338.          this.__column1.label.selectable = false;
  339.          this.__column1.wordWrap = true;
  340.          this.__column1.hScrollPolicy = "off";
  341.          this.__column1.vScrollPolicy = "off";
  342.          this.__column1.borderStyle = "none";
  343.          this.__column1.html = true;
  344.          this.__column1.embedFonts = true;
  345.          this.__column1.styleSheet = _global.textStyles;
  346.       }
  347.       if(this.__column1.text != colText)
  348.       {
  349.          var _loc3_ = this.__description.styleSheet._styles.columnbold.getTextExtent(this.removeHTMLTags(colText),180);
  350.          var _loc5_ = this.removeHTMLTags(colText);
  351.          trace(_loc5_);
  352.          trace("  ascent: " + _loc3_.ascent + ", descent: " + _loc3_.descent + ", width: " + _loc3_.width + ", height: " + _loc3_.height + ", textFieldWidth: " + _loc3_.textFieldWidth + ", textFieldHeight: " + _loc3_.textFieldHeight);
  353.          var _loc6_ = 15;
  354.          var _loc7_ = _loc3_.textFieldHeight + 5;
  355.          this.__column1.text = colText;
  356.          this.__column1._x = 2 * SoftwarePage.__pageBorder;
  357.          trace("-------------------");
  358.          trace("__columnBackground._y: " + (this.__column1._y - SoftwarePage.__vSpacing));
  359.          trace("__headerBoxHeight: " + SoftwarePage.__headerBoxHeight);
  360.          trace("__vSpacing: " + SoftwarePage.__vSpacing);
  361.          this.__column1._y = 251 + SoftwarePage.__headerBoxHeight;
  362.          this.__column1.setSize(180,140);
  363.       }
  364.    }
  365.    function set column2(colText)
  366.    {
  367.       if(this.__column2 == undefined)
  368.       {
  369.          this.__column2 = this.createClassObject(mx.controls.TextArea,"footerCol1",this.__nextDepth);
  370.          this.__nextDepth = this.__nextDepth + 1;
  371.          this.__column2.editable = false;
  372.          this.__column2.label.selectable = false;
  373.          this.__column2.wordWrap = true;
  374.          this.__column2.hScrollPolicy = "off";
  375.          this.__column2.vScrollPolicy = "off";
  376.          this.__column2.borderStyle = "none";
  377.          this.__column2.html = true;
  378.          this.__column2.embedFonts = true;
  379.          this.__column2.styleSheet = _global.textStyles;
  380.       }
  381.       if(this.__column2.text != colText)
  382.       {
  383.          var _loc3_ = this.__description.styleSheet._styles.columnbold.getTextExtent(this.removeHTMLTags(colText),170);
  384.          var _loc5_ = this.removeHTMLTags(colText);
  385.          trace(_loc5_);
  386.          trace("  ascent: " + _loc3_.ascent + ", descent: " + _loc3_.descent + ", width: " + _loc3_.width + ", height: " + _loc3_.height + ", textFieldWidth: " + _loc3_.textFieldWidth + ", textFieldHeight: " + _loc3_.textFieldHeight);
  387.          var _loc6_ = 15;
  388.          var _loc7_ = _loc3_.textFieldHeight + 5;
  389.          this.__column2.text = colText;
  390.          this.__column2._x = this.__column1._x + this.__column1.width + SoftwarePage.__hSpacing;
  391.          this.__column2._y = 251 + SoftwarePage.__headerBoxHeight;
  392.          this.__column2.setSize(170,140);
  393.       }
  394.    }
  395.    function countReturns(columnText)
  396.    {
  397.       var _loc2_ = 0;
  398.       var _loc3_ = " ";
  399.       var _loc1_ = columnText.indexOf(" ",0);
  400.       while(_loc1_ != -1)
  401.       {
  402.          _loc2_ = _loc2_ + 1;
  403.          _loc1_ = columnText.indexOf(" ",_loc1_ + _loc3_.length);
  404.       }
  405.       return _loc2_;
  406.    }
  407.    function set columnBackground(showBackground)
  408.    {
  409.       if(showBackground == true)
  410.       {
  411.          this.drawBackground("0x808080","0xEDE7D5");
  412.          this.__columnBackground.visible = true;
  413.       }
  414.    }
  415.    function drawBackground(darkCol, lightCol)
  416.    {
  417.       if(this.__column1 != undefined)
  418.       {
  419.          trace("__column1: " + this.__column1);
  420.          this.__columnBackground = this.createEmptyMovieClip("columnBackground",0);
  421.          if(this.__column2 != undefined)
  422.          {
  423.             var backgroundWidth = 365;
  424.          }
  425.          else
  426.          {
  427.             var backgroundWidth = 365;
  428.          }
  429.          var greaterHeight = this.__column1.height <= this.__column2.height ? this.__column2.height : this.__column1.height;
  430.          var backgroundHeight = 147 + 2 * SoftwarePage.__vSpacing;
  431.          this.__columnBackground._x = SoftwarePage.__pageBorder;
  432.          this.__columnBackground._y = 253;
  433.          with(this.__columnBackground)
  434.          {
  435.             trace("HEADERBOXHEIGHT: " + __headerBoxHeight);
  436.             beginFill(lightCol,100);
  437.             moveTo(__pageBorder,0);
  438.             lineStyle(1,lightCol,100);
  439.             lineTo(backgroundWidth,0);
  440.             lineTo(backgroundWidth,backgroundHeight);
  441.             lineTo(__pageBorder,backgroundHeight);
  442.             lineTo(__pageBorder,0);
  443.             endFill;
  444.             beginFill(darkCol,100);
  445.             lineStyle(1,darkCol,100);
  446.             moveTo(__pageBorder,0);
  447.             lineTo(backgroundWidth,0);
  448.             lineTo(backgroundWidth,19);
  449.             lineTo(__pageBorder,19);
  450.             lineTo(__pageBorder,0);
  451.             endFill;
  452.          }
  453.          trace("__column2Groups: " + this.__column2Groups);
  454.          trace(this.__column1);
  455.          if(this.__column2Groups >= 1 && this.__column2Groups != undefined)
  456.          {
  457.             with(this.__columnBackground)
  458.             {
  459.                beginFill(darkCol,0);
  460.                lineStyle(1,darkCol,20);
  461.                moveTo(backgroundWidth / 2,27);
  462.                lineTo(backgroundWidth / 2,backgroundHeight - 5);
  463.                endFill();
  464.             }
  465.          }
  466.          else
  467.          {
  468.             trace("RESIZING COLUMN1 AND TITLE");
  469.             this.__column1.setSize(360,this.__column1.height);
  470.             this.__column1Title.setSize(360);
  471.          }
  472.       }
  473.    }
  474.    function removeHTMLTags(htmlText)
  475.    {
  476.       var _loc6_ = function(txt, index)
  477.       {
  478.          return txt.indexOf("<",index);
  479.       };
  480.       var _loc8_ = function(txt, index)
  481.       {
  482.          return txt.indexOf(">",index);
  483.       };
  484.       var _loc2_ = new Array();
  485.       var _loc7_ = 0;
  486.       var _loc9_ = undefined;
  487.       var _loc10_ = undefined;
  488.       while(_loc7_ < htmlText.length)
  489.       {
  490.          _loc9_ = _loc6_(htmlText,_loc7_);
  491.          if(_loc9_ == -1)
  492.          {
  493.             break;
  494.          }
  495.          _loc10_ = _loc8_(htmlText,_loc9_);
  496.          var _loc3_ = _loc6_(htmlText,_loc10_);
  497.          while(_loc3_ == _loc10_ + 1)
  498.          {
  499.             _loc10_ = _loc8_(htmlText,_loc3_);
  500.             _loc3_ = _loc6_(htmlText,_loc10_);
  501.          }
  502.          _loc2_.push({start:_loc9_,end:_loc10_});
  503.          _loc7_ = _loc10_ + 1;
  504.       }
  505.       var _loc5_ = 0;
  506.       while(_loc5_ < _loc2_.length)
  507.       {
  508.          _loc9_ = _loc2_[_loc5_].start;
  509.          var _loc11_ = htmlText.charAt(_loc2_[_loc5_].start);
  510.          _loc10_ = _loc2_[_loc5_].end;
  511.          var _loc12_ = htmlText.charAt(_loc2_[_loc5_].end);
  512.          var _loc16_ = htmlText.substring(_loc9_ + 1,_loc10_);
  513.          _loc5_ = _loc5_ + 1;
  514.       }
  515.       if(_loc2_.length != 0)
  516.       {
  517.          var _loc18_ = "";
  518.          if(_loc2_[0].start > 0)
  519.          {
  520.             _loc18_ += htmlText.substring(0,_loc2_[0].start);
  521.          }
  522.          var _loc4_ = 0;
  523.          while(_loc4_ < _loc2_.length - 1)
  524.          {
  525.             var _loc13_ = _loc2_[_loc4_].end + 1;
  526.             var _loc15_ = _loc2_[_loc4_ + 1].start;
  527.             _loc18_ += htmlText.substring(_loc2_[_loc4_].end + 1,_loc2_[_loc4_ + 1].start);
  528.             _loc4_ = _loc4_ + 1;
  529.          }
  530.          if(_loc2_[_loc2_.length - 1].end < htmlText.length - 1)
  531.          {
  532.             _loc18_ += htmlText.substring(_loc2_[_loc2_.length - 1].end + 1);
  533.          }
  534.          return _loc18_;
  535.       }
  536.       return htmlText;
  537.    }
  538.    function sendMessage(p_msgtxt)
  539.    {
  540.       var _loc2_ = {target:this,type:"pageReady"};
  541.       _loc2_.msgtxt = p_msgtxt;
  542.       _loc2_.pageType = "SoftwarePage";
  543.       this.dispatchEvent(_loc2_);
  544.    }
  545. }
  546.